<template>
    <div class="app-container">
        <el-form
            :model="queryParams"
            ref="queryForm"
            size="small"
            :inline="true"
            label-width="68px"
            style="text-align: left"
        >
            <el-form-item label="部门" prop="jlDeptId">
                <treeselect
                    v-model="queryParams.jlDeptId"
                    :options="deptOptions"
                    :show-count="true"
                    placeholder=""
                    @keyup.enter.native="handleQuery"
                    style="width: 215px"
                />
            </el-form-item>
            <el-form-item label="姓名" prop="realName">
                <el-input
                    v-model="queryParams.realName"
                    placeholder=""
                    clearable
                    @keyup.enter.native="handleQuery"
                />
            </el-form-item>
            <el-form-item label="日期" prop="yearMonth">
                <el-date-picker
                    v-model="queryParams.yearMonth"
                    value-format="yyyy-MM"
                    type="month"
                    placeholder=""
                >
                </el-date-picker>
            </el-form-item>

            <el-form-item>
                <el-button
                    type="primary"
                    icon="el-icon-search"
                    size="mini"
                    @click="handleQuery"
                    >查询</el-button
                >
                <el-button
                    icon="el-icon-refresh"
                    size="mini"
                    @click="resetQuery"
                    >重置</el-button
                >
            </el-form-item>
        </el-form>

        <TableCard>
            <el-row :gutter="10" class="mb8">
                <el-col :span="1.5">
                    <div>
                        <span>核算周期：</span>
                        <span
                            >{{
                                queryParams.periodYear == null
                                    ? "   暂无   "
                                    : queryParams.periodYear
                            }}年{{
                                queryParams.periodMonth == null
                                    ? "   暂无   "
                                    : queryParams.periodMonth
                            }}月</span
                        >
                        <!--                        <span>至</span>-->
                        <!--                        <span>{{endPeriod}}</span>-->
                    </div>
                </el-col>
                <el-col :span="1.5">
                    <el-button
                        type="primary"
                        icon="el-icon-s-claim"
                        size="mini"
                        @click="calcSalary"
                        >批量核算
                    </el-button>
                </el-col>
            </el-row>
            <el-table
                :border="Global.tableShowBorder"
                v-loading="loading"
                :data="salaryDataList"
            >
                <el-table-column
                    type="index"
                    width="50"
                    label="序号"
                    align="center"
                ></el-table-column>
                <el-table-column
                    label="日期(年月)"
                    align="center"
                    prop="periodYear
"
                    width="160"
                >
                    <template slot-scope="scope">
                        <span>{{
                            scope.row.periodYear +
                            "年" +
                            scope.row.periodMonth +
                            "月"
                        }}</span>
                    </template>
                </el-table-column>

                <el-table-column
                    label="部门"
                    align="center"
                    prop="deptName"
                    :show-overflow-tooltip="true"
                />
                <el-table-column
                    label="岗位"
                    align="center"
                    prop="postId"
                    :show-overflow-tooltip="true"
                >
                    <template slot-scope="scope">
                        <span>{{ parsePostName(scope.row.postId) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="姓名" align="center" prop="realName">
                </el-table-column>
                <!-- <el-table-column label="基本工资" align="center" prop="basic">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.basic) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="岗位工资" align="center" prop="post">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.post) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="奖励工资" align="center" prop="position">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.position) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="绩效工资" align="center" prop="house">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.house) }}</span>
                    </template>
                </el-table-column>

                <el-table-column label="补贴合计" align="center" prop="performance">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.performance) }}</span>
                </template>
                </el-table-column>
                <el-table-column label="保险合计" align="center" prop="grsb">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.grsb) }}</span>
                </template>
                </el-table-column>
                <el-table-column label="公积金合计" align="center" prop="grgjj">
                    <template slot-scope="scope">
                        <span style="font-weight: 900;color: red;">{{ util.toEsStr(scope.row.grgjj) }}</span>
                </template>
                </el-table-column> -->

                <!-- <el-table-column v-for="type in salaryTypeList" :label="type.name" align="center">
                    <el-table-column v-for="item in salaryConfigList" v-if="item.type==type.id" :label="item.name" align="center" :prop="item.code" width="150"/>
                </el-table-column> -->

                <el-table-column
                    label="应发工资"
                    align="center"
                    prop="yfgz"
                    fixed="right"
                >
                    <template slot-scope="scope">
                        <span style="color: red; font-weight: 900">{{
                            util.toEsStr(scope.row.yfgz)
                        }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    label="应扣工资"
                    align="center"
                    prop="ykgz"
                    fixed="right"
                >
                    <template slot-scope="scope">
                        <span style="color: red; font-weight: 900">{{
                            util.toEsStr(scope.row.ykgz)
                        }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    label="实发工资"
                    align="center"
                    prop="sfgz"
                    fixed="right"
                >
                    <template slot-scope="scope">
                        <span style="color: red; font-weight: 900">{{
                            util.toEsStr(
                                $store.getters.allDefectObj["HR-WEB-088"] == 0
                                    ? scope.row.yfgz
                                    : scope.row.sfgz
                            )
                        }}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    label="操作"
                    align="center"
                    class-name="small-padding fixed-width"
                    fixed="right"
                    width="140"
                >
                    <template slot-scope="scope">
                        <el-button
                            size="mini"
                            type="text"
                            icon="el-icon-delete"
                            @click="handleDelete(scope.row)"
                            v-hasPermi="['hrm:salaryData:edit']"
                        >
                            删除
                        </el-button>
                        <el-button
                            size="mini"
                            type="text"
                            icon="el-icon-view"
                            @click="handleUpdate(scope.row)"
                            v-hasPermi="['hrm:salaryData:edit']"
                        >
                            查看
                        </el-button>
                        <!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['hrm:salaryData:edit']">
                            单人核算
                        </el-button> -->
                    </template>
                </el-table-column>
            </el-table>

            <pagination
                v-show="total > 10"
                :total="total"
                :page.sync="queryParams.pageNum"
                :limit.sync="queryParams.pageSize"
                @pagination="getList"
            />
        </TableCard>

        <el-drawer
            :title="
                $store.getters.allDefectObj['HR-WEB-087'] == 0
                    ? '工资信息'
                    : '工作核算详情查看'
            "
            :visible.sync="open"
            :size="1000"
            append-to-body
            class="openForm"
        >
            <el-form
                ref="form"
                :model="form"
                :rules="rules"
                label-width="120px"
            >
                <el-form
                    ref="form"
                    :model="form"
                    :rules="rules"
                    label-width="120px"
                    disabled
                >
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="基础工资" prop="basic">
                            <el-input
                                disabled
                                v-model="form.basic"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="岗位工资" prop="post">
                            <el-input
                                disabled
                                v-model="form.post"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="奖励工资" prop="position">
                            <el-input
                                disabled
                                v-model="form.position"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="绩效工资" prop="performance">
                            <el-input
                                disabled
                                v-model="form.performance"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="补贴合计" prop="house">
                            <el-input
                                disabled
                                v-model="form.house"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="保险合计" prop="grsb">
                            <el-input
                                disabled
                                v-model="form.grsb"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="公积金合计" prop="grgjj">
                            <el-input
                                disabled
                                v-model="form.grgjj"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="加班费" prop="gz996">
                            <el-input
                                disabled
                                v-model="form.gz996"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12">
                        <el-form-item label="请假扣款" prop="jqkk">
                            <el-input
                                disabled
                                v-model="form.jqkk"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24">
                        <el-form-item label="应发合计" prop="yfgz">
                            <el-input
                                disabled
                                v-model="form.yfgz"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24">
                        <el-form-item label="实发合计" prop="sfgz">
                            <el-input
                                disabled
                                v-model="form.sfgz"
                                @input="calcTatal"
                            >
                                <template slot="append">元</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-form>
            </el-form>
            <div class="drawer-footer">
                <el-button @click="cancel">返 回</el-button>
            </div>
        </el-drawer>

        <el-dialog
            :visible.sync="showInitData"
            title="月工资批量核算"
            width="600px"
            append-to-body
        >
            <!-- <div style="font-size: 14px;padding-bottom: 20px;">
                初始化年月：初始化后将按月进行核算，请设置初始化月份，点击确定按钮后进行核算。
            </div> -->
            <el-form
                :model="calcForm"
                ref="calcForm"
                size="small"
                :rules="calcRules"
                label-width="80px"
            >
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="年份" prop="periodYear">
                            <el-date-picker
                                v-model="calcForm.periodYear"
                                type="year"
                                placeholder="选择年"
                                value-format="yyyy"
                            ></el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="月份" prop="periodMonth">
                            <el-select
                                v-model="calcForm.periodMonth"
                                placeholder="请选择月份"
                            >
                                <el-option
                                    key="01"
                                    label="一月"
                                    value="01"
                                ></el-option>
                                <el-option
                                    key="02"
                                    label="二月"
                                    value="02"
                                ></el-option>
                                <el-option
                                    key="03"
                                    label="三月"
                                    value="03"
                                ></el-option>
                                <el-option
                                    key="04"
                                    label="四月"
                                    value="04"
                                ></el-option>
                                <el-option
                                    key="05"
                                    label="五月"
                                    value="05"
                                ></el-option>
                                <el-option
                                    key="06"
                                    label="六月"
                                    value="06"
                                ></el-option>
                                <el-option
                                    key="07"
                                    label="七月"
                                    value="07"
                                ></el-option>
                                <el-option
                                    key="08"
                                    label="八月"
                                    value="08"
                                ></el-option>
                                <el-option
                                    key="09"
                                    label="九月"
                                    value="09"
                                ></el-option>
                                <el-option
                                    key="10"
                                    label="十月"
                                    value="10"
                                ></el-option>
                                <el-option
                                    key="11"
                                    label="十一月"
                                    value="11"
                                ></el-option>
                                <el-option
                                    key="12"
                                    label="十二月"
                                    value="12"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitCalcForm"
                    >核 算</el-button
                >
                <el-button @click="showInitData = false">取 消</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
import {
    listSalaryData,
    getSalaryData,
    delSalaryData,
    addSalaryData,
    updateSalaryData,
    getMaxMonth,
    calcData,
} from "@/api/hrm/salaryData";
import moment from "moment";
import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listPostAll } from "@/api/system/post";
import { listSalaryItemConfig } from "@/api/hrm/salaryItemConfig";

export default {
    name: "SalaryData",
    dicts: ["hrm_staff_type"],
    components: { Treeselect },
    data() {
        return {
            salaryTypeList: [
                { id: "0", name: "基本工资", status: "1" },
                { id: "1", name: "津贴", status: "1" },
                { id: "2", name: "浮动工资", status: "1" },
                { id: "3", name: "奖金", status: "1" },
                { id: "4", name: "提成工资", status: "1" },
                { id: "5", name: "计件工资", status: "1" },
                { id: "6", name: "计时工资", status: "1" },
                { id: "7", name: "工龄/司龄工资", status: "1" },
                { id: "8", name: "职称工资", status: "1" },
                { id: "9", name: "代扣代缴", status: "1" },
                { id: "10", name: "企业代缴", status: "1" },
                { id: "11", name: "税前补发", status: "1" },
                { id: "12", name: "税前补扣", status: "1" },
                { id: "13", name: "税后补发", status: "1" },
                { id: "14", name: "税后补扣", status: "1" },
                { id: "15", name: "特殊计费项", status: "1" },
                { id: "16", name: "加班工资", status: "1" },
                { id: "17", name: "考勤组扣款明细", status: "1" },
                { id: "18", name: "个税抵扣", status: "1" },
                { id: "50", name: "应发工资", status: "1" },
                { id: "51", name: "应税工资", status: "1" },
                { id: "52", name: "个人所得税", status: "1" },
                { id: "53", name: "实发工资", status: "1" },
            ],
            salaryConfigList: [],
            deptOptions: [],
            postList: [],
            //核算月份
            startPeriod: "暂无",
            endPeriod: "暂无",
            showInitData: false,
            // 遮罩层
            loading: true,
            // 总条数
            total: 0,
            // 工资核算表格数据
            salaryDataList: [],
            // 弹出层标题
            title: "",
            // 是否显示弹出层
            open: false,
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                staffType: "",
                orderByColumn: "createTime",
                isAsc: "descending",
                staffId: null,
                realName: "",
                code: null,
                name: null,
                amt: null,
                periodYear: null,
                periodMonth: null,
                yearMonth: moment().subtract(1, "months").format("YYYY-MM"),
            },
            // 表单参数
            form: {
                basic: null,
                post: null,
                position: null,
                performance: null,
                house: null,
                grsb: null,
                grgjj: null,
                gz996: null,
                jqkk: null,
                yfgz: null,
                sfgz: null,
            },
            // 表单校验
            rules: {},
            periodYear: "",
            periodMonth: "",
            calcForm: {
                periodYear: "",
                periodMonth: "",
            },
            calcRules: {
                periodYear: [
                    {
                        required: true,
                        message: "年份不能为空",
                        trigger: "blur",
                    },
                ],
                periodMonth: [
                    {
                        required: true,
                        message: "月份不能为空",
                        trigger: "blur",
                    },
                ],
            },
        };
    },
    created() {
        // this.getSalaryConfigList();
        this.getTreeselect();
        this.getPostData();
        this.getList();
    },
    methods: {
        /** 查询工资核算列表 */
        getList() {
            //查询数量
            // getMaxMonth().then((res) => {
            //     this.loading = false;
            //     if (res.data.max != "noData") {
            //         let arr = res.data.max.split("-");
            //         let next = res.data.next.split("-");
            //         this.calcForm.periodYear = next[0];
            //         this.calcForm.periodMonth = next[1];
            //         this.queryParams.periodYear = arr[0];
            //         this.queryParams.periodMonth = arr[1];

            this.loading = true;
            let tempParams = this.queryParams;
            if (tempParams.yearMonth) {
                tempParams.periodYear = tempParams.yearMonth.split("-")[0];
                tempParams.periodMonth = tempParams.yearMonth.split("-")[1];
            } else {
                tempParams.periodYear = null;
                tempParams.periodMonth = null;
            }
            listSalaryData(tempParams).then((response) => {
                this.salaryDataList = response.rows;
                this.total = response.total;
                this.loading = false;
            });
            // }
            // });
        },
        getSalaryConfigList() {
            let query = {
                status: 0,
            };
            listSalaryItemConfig().then((res) => {
                this.salaryConfigList = res.data;
                let typeArr = this.salaryTypeList;
                this.salaryConfigList.forEach((item) => {
                    typeArr.forEach((t) => {
                        console.log(
                            item.type +
                                "," +
                                item.name +
                                "。" +
                                t.id +
                                "," +
                                t.name
                        );
                        if (t.id == item.type) {
                            if (item.status == "0") {
                                t.status = "0";
                            }
                        }
                    });
                });
                this.salaryTypeList = typeArr;
            });
        },
        /** 查询部门下拉树结构 */
        getTreeselect() {
            treeselect().then((response) => {
                this.deptOptions = response.data;
            });
        },
        // 取消按钮
        cancel() {
            if (this.$store.getters.allDefectObj["HR-WEB-089"] == 0) {
                this.$router.push("/hrManager/workBench");
            }

            this.open = false;
            this.reset();
        },
        // 表单重置
        reset() {
            this.form = {
                id: null,
                staffId: null,
                periodYear: null,
                periodMonth: null,
                createTime: null,
                createBy: null,
                tenantId: null,
                basic: null,
                post: null,
                position: null,
                house: null,
                temperature: null,
                traffic: null,
                meal: null,
                phone: null,
                performance: null,
                month: null,
                quarter: null,
                year: null,
                attendance: null,
                recommend: null,
                sale: null,
                calcCount: null,
                calcTime: null,
                workAge: null,
                comAge: null,
                professional: null,
                skill: null,
                education: null,
                grsb: null,
                grgjj: null,
                qysb: null,
                qygjj: null,
                sqbf: null,
                sqbk: null,
                shbf: null,
                df: null,
                ghf: null,
                bcyl: null,
                sybxj: null,
                gz996: null,
                cdkk: null,
                ztkk: null,
                kgkk: null,
                jqkk: null,
                qkkk: null,
                zhkk: null,
                kqkkhj: null,
                kcZnjy: null,
                kcZfzj: null,
                kcFdlx: null,
                kcSylr: null,
                kcJxjy: null,
                yfgz: null,
                ysgz: null,
                grsds: null,
                sfgz: null,
            };
            this.resetForm("form");
        },

        handleDelete(row) {
            this.$confirm("请确认是否删除该记录", "删除确认", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    delSalaryData(row.id).then((response) => {
                        this.$modal.msgSuccess("删除成功");
                        this.getList();
                    });
                })
                .catch(() => {});
        },
        /** 修改按钮操作 */
        handleUpdate(row) {
            this.reset();
            const id = row.id || this.ids;
            getSalaryData(id).then((response) => {
                this.form = response.data;

                if (!this.form.gz996) {
                    this.form.gz996 = "—";
                }
                if (!this.form.jqkk) {
                    this.form.jqkk = "—";
                }

                this.open = true;
            });
        },
        /** 提交按钮 */
        submitForm() {
            this.$refs["form"].validate((valid) => {
                if (valid) {
                    if (this.form.id != null) {
                        updateSalaryData(this.form).then((response) => {
                            this.$modal.msgSuccess("修改成功");
                            this.open = false;
                            this.getList();
                        });
                    } else {
                        addSalaryData(this.form).then((response) => {
                            this.$modal.msgSuccess("新增成功");
                            this.open = false;
                            this.getList();
                        });
                    }
                }
            });
        },
        calcSalary() {
            if (this.$store.getters.allDefectObj["HR-WEB-086"] == 0) {
                return;
            }

            //查询数量
            getMaxMonth().then((res) => {
                this.showInitData = true;
                //需要初始化
                // if (res.data.max == 'noData') {
                //     this.showInitData = true;
                // } else {
                //     let arr = res.data.next.split("-");
                //     this.calcForm.periodYear = arr[0];
                //     this.calcForm.periodMonth = arr[1];
                //     this.$modal.confirm('是否生成  ' + this.calcForm.periodYear + '年' + this.calcForm.periodMonth + '月  的工资核算信息？').then(() => {
                //         //生成社保缴纳信息
                //         this.doSubmit();
                //     }).then(() => {
                //     }).catch(() => {
                //     });
                // }
            });
        },
        submitCalcForm() {
            this.$refs["calcForm"].validate((valid) => {
                if (valid) {
                    this.doSubmit();
                }
            });
        },
        /** 查询按钮操作 */
        handleQuery() {
            console.log(111111111);
            this.queryParams.pageNum = 1;
            this.getList();
        },
        resetQuery() {
            this.resetForm("queryForm");
            this.queryParams.staffType = "";
            this.handleQuery();
        },
        doSubmit() {
            calcData(this.calcForm).then((res) => {
                if (200 == res.code) {
                    this.$modal.msgSuccess("核算成功");
                    this.showInitData = false;
                    this.getList();
                }
            });
        },
        getPostData() {
            listPostAll().then((res) => {
                this.postList = res.data;
            });
        },
        parsePostName(ids) {
            let nameArr = [];
            if (ids) {
                let selIds = ids.split(",");
                this.postList.forEach((item) => {
                    selIds.forEach((sel) => {
                        if (item.postId == sel) {
                            nameArr.push(item.postName);
                        }
                    });
                });
            }
            return nameArr.join(",");
        },
        ifHave(code) {
            let re = false;
            this.salaryConfigList.forEach((item) => {
                if (item.code == code) {
                    if (item.status == "0") {
                        re = true;
                    }
                }
            });
            return re;
        },
        ifTypeHava(type) {
            let re = false;
            this.salaryConfigList.forEach((item) => {
                if (item.type == type) {
                    if (item.status == "0") {
                        re = true;
                    }
                }
            });
            return re;
        },
        calcTatal(item) {
            let total = 0;
            this.salaryConfigList.forEach((item) => {
                total =
                    total +
                    Number(this.form[item.code] ? this.form[item.code] : 0);
            });
            this.form.total = total.toFixed(2);
            console.log(this.form.total);
            this.totalToEn();
            //自定义的工资项组织数据
            this.buildCustomData();
        },
        totalToEn() {
            this.form.totalEs = this.util.toEsStr(this.form.total, true);
        },
        buildCustomData() {
            let customData = [];
            this.salaryConfigList.forEach((c) => {
                //如果是自定义的工资项
                if (c.isCustom == "Y") {
                    let value = this.form[c.code];
                    console.log("自定义工资项：" + value);
                    if (typeof value != "undefined") {
                        let d = {};
                        d.code = c.code;
                        d.value = Number(value).toFixed(2);
                        customData.push(d);
                    }
                }
            });
            this.form.customDataStr = JSON.stringify(customData);
            console.log("所有自定义工资项：" + this.form.customDataStr);
        },
    },
};
</script>
